import request from '@/utils/request'
// 获取经纪列表 数据
export function getAgentsList({
  _limit,
  _start,
  name_contains
}) {
  return request({
    url: `/agents?_limit=${_limit}&_start=${_start}&name_contains=${name_contains}`
  })
}
// 获取经纪信息条数
export function getAgentsListTotal(name_contains) {
  return request({
    url: `/agents/count?name_contains=${name_contains}`
  })
}
// 新增经纪信息
export function addAgent(data) {
  return request({
    url: `/agents`,
    method: 'post',
    data
  })
}
// 获取经纪信息详情
export function editAgent(id) {
  return request({
    url: `/agents/${id}`
  })
}
// 提交编辑
export function submitEditAgent(id, data) {
  return request({
    url: `/agents/${id}`,
    method: 'put',
    data
  })
}
// 删除内容
export function deleteAgent(id) {
  return request({
    url: `/agents/${id}`,
    method: 'delete'
  })
}
